package com.hzd.entity;

import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;

/**
 * 企业团购申请
 *
 * @author christ
 * @date 2015/10/23
 */
@Entity
public class RentApplyOrg extends BaseEntity {

    @Id
    @Column(length = 32)
    private String id;

    @NotNull(message = "企业名称不能为空")
    @Length(max = 50, message = "企业名称长度非法")
    @Column(columnDefinition = "varchar(50) COMMENT '名称'")
    private String name;


    @Column(columnDefinition = "integer COMMENT '员工数'")
    private Integer staffNum;

    @Column(columnDefinition = "varchar(30) COMMENT '联系人'")
    @Length(max = 30, message = "联系人长度非法")
    private String contact;

    @Column(columnDefinition = "varchar(50) COMMENT '联系方式'")
    @Length(max = 50, message = "联系方式长度非法")
    private String contactWay;

    private String openid;

    /**
     * 推荐人
     */
    private String referrer;

    public String getId() {
        return id;
    }

    public RentApplyOrg setId(String id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public RentApplyOrg setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getStaffNum() {
        return staffNum;
    }

    public RentApplyOrg setStaffNum(Integer staffNum) {
        this.staffNum = staffNum;
        return this;
    }

    public String getContact() {
        return contact;
    }

    public RentApplyOrg setContact(String contact) {
        this.contact = contact;
        return this;
    }

    public String getContactWay() {
        return contactWay;
    }

    public RentApplyOrg setContactWay(String contactWay) {
        this.contactWay = contactWay;
        return this;
    }

    public String getOpenid() {
        return openid;
    }

    public RentApplyOrg setOpenid(String openid) {
        this.openid = openid;
        return this;
    }

    public String getReferrer() {
        return referrer;
    }

    public RentApplyOrg setReferrer(String referrer) {
        this.referrer = referrer;
        return this;
    }
}
